@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal">

            <input type="hidden" id="id" value="${template.id}">

            <div class="row">
                <div class="col-sm-6 b-r">
                    <#input id="templateName" name="模板名称" underline="true" value="${template.templateName}"/>
                </div>
                <div class="col-sm-6">
                    <#input id="templateDesc" name="描述" underline="true" value="${template.templateDesc}"/>
                </div>
                <div class="col-sm-6">
                    <#input id="fileName" name="文件名称" underline="true" value="${template.fileName}"/>
                </div>
                <div class="col-sm-6">
                    <#input id="templatePath" name="路径" underline="true" value="${template.templatePath}"/>
                </div>
                <div class="col-sm-6">
                    <#input id="localPath" name="本地路径" underline="true" value="${template.localPath}"/>
                </div>
                <div class="col-sm-6">
                    <#select id="groupId" name="组" underline="true" value="${template.groupId}">
                        @ for(g in groups!){
                        <option value="${g.id}">${g.name}</option>
                        @}
                    </#select>
                </div>
                <div class="col-sm-6">
                    <#select id="templateType" name="类型" underline="true" value="${template.templateType}">
                        <option value="beetl">beetl</option>
                        <option value="freeMarker">freeMarker</option>
                    </#select>
                </div>
                <div class="col-sm-6">
                    <#select id="fileType" name="语言" underline="true" value="${file.fileType!}">
                        <option value="C">C</option>
                        <option value="C#">C#</option>
                        <option value="C++">C++</option>
                        <option value="GO">GO</option>
                        <option value="Java">Java</option>
                        <option value="JavaScript">JavaScript</option>
                        <option value="Html">Html</option>
                        <option value="Xml">Xml</option>
                        <option value="Objective-C">Objective-C</option>
                        <option value="PHP">PHP</option>
                        <option value="Python">Python</option>
                        <option value="SQL">SQL</option>
                    </#select>
                </div>
                <div class="col-sm-12">
                    <textarea id="file" name="file" class="form-control" style="display:none"
                              rows="15">${file.file!}</textarea>
                    <pre  id="codeFile" style="height: 310px;">
                        <code class="${file.fileType!}">
                        </code>
                    </pre>
                </div>
            </div>

            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TemplateInfoDlg.editSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TemplateInfoDlg.close()"/>
                </div>
            </div>
        </div>

    </div>
</div>
<script src="${ctxPath}/static/modular/code/template/template_info.js"></script>
@}
